package com.cnbot.camera;

import android.os.Binder;

/**
 * Copyright (c) 2016--2019/3/25  Hunan Cnbot Co., Ltd. All Rights Reserved.
 *
 * @descriptoin 具体摄像头binder服务
 * @FileName: CameraBinderImpl2.java
 * @author: dc
 * @date: 2019/3/25 15:42
 * @version: 1.0
 */

public class CameraBinderImpl2 extends Binder implements ICameraBinder2  {
    private final BaseCameraService2 mService;

    public CameraBinderImpl2(BaseCameraService2 baseCameraService) {
        mService = baseCameraService;
    }

    @Override
    public boolean isPreviewing() {
        return mService.isPreviewing();
    }

    @Override
    public void addCameraPreviewListener(ICameraPreviewListener l) {
        mService.addCameraPreviewListener(l);
    }

    @Override
    public void removeListener() {
        mService.removeListener();
    }

    @Override
    public boolean removePreviewListener(ICameraPreviewListener l) {
        return mService.removePreviewListener(l);
    }

    @Override
    public void resetParameters(int[] size, String focusMode) {
        mService.resetParameters(size, focusMode);
    }

    @Override
    public void openCamera() {
        mService.openCamera();
    }

    @Override
    public void closeCamera() {
        mService.closeCamera();
    }
}
